import { http } from "@/utils/http";
import { baseUrlApi } from "./utils";

type Result = {
  success: boolean;
  data: Array<any>;
};

type HomeResult = {
  success: boolean;
  produceQuestionSize: number;
  simulatorQuestionSize: number;
  producePaperSize: number;
  produceTaskSize: number;
  studentXtUserSize: number;
};

export const getAsyncRoutes = () => {
  return http.request<Result>("get", baseUrlApi("getAsyncRoutes"));
};

export const queryHomePage = () => {
  return http.request<HomeResult>("get", baseUrlApi("queryHomePage"));
};
